<div class="nav-tabs-custom">
	<ul class="nav nav-tabs">
		<li class="active"><a href="#fa-icons">列表</a></li>
		<li class=""><a href="{:Url('add')}">添加菜单</a></li>
	</ul>
	
	<div class="box-body">
		<form class="js-ajax-form" action="{:Url('Menu/listorders')}" method="post">
			<div class="table-actions">
				<button class="btn btn-primary btn-ss btn-flat js-ajax-submit" type="submit">排序</button>
			</div>
			<table class="table table-hover table-bordered" id="menus-table">
				<thead>
					<tr>
						<th width="80">排序</th>
						<th width="50">ID</th>
						<th>应用</th>
						<th>菜单名称</th>
						<th width="80">状态</th>
						<th width="100">操作</th>
					</tr>
				</thead>
				<tbody>
                    {volist name="lists" id="vo"}
                    <tr id="node-{$vo.id}" class="<?php echo !empty($vo['parentid']) ? 'child-of-node-'.$vo['parentid'] : '';?>" style='<?php echo !empty($vo['parentid']) ? 'display:none;' : '';?>'>
						<td style='padding-left:20px;'>
                            <input name="sort[{$vo.id}]" type="number" size="6" min="0" value="{$vo.sort}" class="form-control input-sm input-ss display_de width50" />
                        </td>
						<td>{$vo.id}</td>
						<td>{$vo.module}/{$vo.control}/{$vo.action}</td>
						<td>{$vo._name|raw}</td>
						<td>{$displays[$vo['display']]}</td>
						<td>
                            <a href="{:Url('Menu/add', array('parentid' => $vo['id']))}" class="btn btn-xs btn-success btn-flat" data-toggle="tooltip" data-placement="top" title="添加子菜单"><i class="fa fa-plus-circle"></i></a>
                            <a href="{:Url('Menu/edit', array('id' => $vo['id']))}" class="btn btn-xs btn-primary btn-flat" data-toggle="tooltip" data-placement="top" title="编辑菜单"><i class="fa fa-edit"></i></a>
                            <a href="{:Url('Menu/delete', array('id' => $vo['id']) )}" class="btn btn-xs btn-danger btn-flat js-ajax-del" data-toggle="tooltip" data-placement="top" title="删除菜单"><i class="fa fa-trash-o"></i></a>
                        </td>
					</tr>
                    {/volist}
				</tbody>
				<tfoot>
					<tr>
						<th>排序</th>
						<th>ID</th>
						<th>应用</th>
						<th>菜单名称</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</tfoot>
			</table>
			<div class="table-actions">
				<button class="btn btn-primary btn-ss btn-flat js-ajax-submit" type="submit">排序</button>
			</div>
		</form>
	</div>

</div>
<script type="text/javascript">
	//全局变量
	var GV = {
	    ROOT: "/",
	    WEB_ROOT: "/",
	    JS_ROOT: "static/js/",
	    APP:'Panel'/*当前应用名*/
	};
	</script>
<script type="text/javascript" src="__JS__/wind.js"></script>
<script type="text/javascript" src="__JS__/treeTable/treeTable.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
			Wind.css('treeTable');
			Wind.use('treeTable', function() {
				$("#menus-table").treeTable({
					indent : 20
				});
			});
		});
</script>